package org.terramagnet.workflow.dynamic.databinding.type;

import org.terramagnet.workflow.dynamic.databinding.DataType;

/**
 *
 * @author terrason
 */
public abstract class BaseDataType<T> implements DataType<T> {

    private int length;
    private int precision;

    @Override
    public int length() {
        return length;
    }

    @Override
    public int precision() {
        return precision;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public void setPrecision(int precision) {
        this.precision = precision;
    }

    @Override
    public String format(T value) {
        return String.valueOf(value);
    }
}
